<?php
	/**
	 * The abstract TableUserProjectTmpGen class defined here is
	 * code-generated and contains all the basic CRUD-type functionality as well as
	 * basic methods to handle relationships and index-based loading.
	 *
	 * To use, you should use the TableUserProjectTmp subclass which
	 * extends this TableUserProjectTmpGen class.
	 *
	 * Because subsequent re-code generations will overwrite any changes to this
	 * file, you should leave this file unaltered to prevent yourself from losing
	 * any information or code changes.  All customizations should be done by
	 * overriding existing or implementing new methods, properties and variables
	 * in the TableUserProjectTmp class.
	 * 
	 * @package My Application
	 * @subpackage GeneratedDataObjects
	 * @property-read integer $Id the value for intId (Read-Only PK)
	 * @property string $UserName the value for strUserName (Unique)
	 * @property string $Firstname the value for strFirstname 
	 * @property string $Lastname the value for strLastname 
	 * @property string $Mail the value for strMail (Not Null)
	 * @property string $Password the value for strPassword 
	 * @property string $Ip the value for strIp 
	 * @property QDateTime $InputDate the value for dttInputDate 
	 * @property QDateTime $TimeupDate the value for dttTimeupDate 
	 * @property string $Url the value for strUrl (Not Null)
	 * @property string $Registered the value for strRegistered (Not Null)
	 * @property QDateTime $RegisterDate the value for dttRegisterDate 
	 * @property-read boolean $__Restored whether or not this object was restored from the database (as opposed to created new)
	 */
	class TableUserProjectTmpGen extends QBaseClass {

		///////////////////////////////////////////////////////////////////////
		// PROTECTED MEMBER VARIABLES and TEXT FIELD MAXLENGTHS (if applicable)
		///////////////////////////////////////////////////////////////////////
		
		/**
		 * Protected member variable that maps to the database PK Identity column table_user_project_tmp.id
		 * @var integer intId
		 */
		protected $intId;
		const IdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.user_name
		 * @var string strUserName
		 */
		protected $strUserName;
		const UserNameMaxLength = 50;
		const UserNameDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.firstname
		 * @var string strFirstname
		 */
		protected $strFirstname;
		const FirstnameMaxLength = 50;
		const FirstnameDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.lastname
		 * @var string strLastname
		 */
		protected $strLastname;
		const LastnameMaxLength = 50;
		const LastnameDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.mail
		 * @var string strMail
		 */
		protected $strMail;
		const MailMaxLength = 100;
		const MailDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.password
		 * @var string strPassword
		 */
		protected $strPassword;
		const PasswordMaxLength = 30;
		const PasswordDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.ip
		 * @var string strIp
		 */
		protected $strIp;
		const IpMaxLength = 30;
		const IpDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.input_date
		 * @var QDateTime dttInputDate
		 */
		protected $dttInputDate;
		const InputDateDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.timeup_date
		 * @var QDateTime dttTimeupDate
		 */
		protected $dttTimeupDate;
		const TimeupDateDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.url
		 * @var string strUrl
		 */
		protected $strUrl;
		const UrlMaxLength = 100;
		const UrlDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.registered
		 * @var string strRegistered
		 */
		protected $strRegistered;
		const RegisteredMaxLength = 1;
		const RegisteredDefault = null;


		/**
		 * Protected member variable that maps to the database column table_user_project_tmp.register_date
		 * @var QDateTime dttRegisterDate
		 */
		protected $dttRegisterDate;
		const RegisterDateDefault = null;


		/**
		 * Protected array of virtual attributes for this object (e.g. extra/other calculated and/or non-object bound
		 * columns from the run-time database query result for this object).  Used by InstantiateDbRow and
		 * GetVirtualAttribute.
		 * @var string[] $__strVirtualAttributeArray
		 */
		protected $__strVirtualAttributeArray = array();

		/**
		 * Protected internal member variable that specifies whether or not this object is Restored from the database.
		 * Used by Save() to determine if Save() should perform a db UPDATE or INSERT.
		 * @var bool __blnRestored;
		 */
		protected $__blnRestored;




		///////////////////////////////
		// PROTECTED MEMBER OBJECTS
		///////////////////////////////





		///////////////////////////////
		// CLASS-WIDE LOAD AND COUNT METHODS
		///////////////////////////////

		/**
		 * Static method to retrieve the Database object that owns this class.
		 * @return QDatabaseBase reference to the Database object that can query this class
		 */
		public static function GetDatabase() {
			return QApplication::$Database[1];
		}

		/**
		 * Load a TableUserProjectTmp from PK Info
		 * @param integer $intId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp
		 */
		public static function Load($intId, $objOptionalClauses = null) {
			// Use QuerySingle to Perform the Query
			return TableUserProjectTmp::QuerySingle(
				QQ::AndCondition(
					QQ::Equal(QQN::TableUserProjectTmp()->Id, $intId)
				),
				$objOptionalClauses
			);
		}

		/**
		 * Load all TableUserProjectTmps
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		 */
		public static function LoadAll($objOptionalClauses = null) {
			if (func_num_args() > 1) {
				throw new QCallerException("LoadAll must be called with an array of optional clauses as a single argument");
			}
			// Call TableUserProjectTmp::QueryArray to perform the LoadAll query
			try {
				return TableUserProjectTmp::QueryArray(QQ::All(), $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count all TableUserProjectTmps
		 * @return int
		 */
		public static function CountAll() {
			// Call TableUserProjectTmp::QueryCount to perform the CountAll query
			return TableUserProjectTmp::QueryCount(QQ::All());
		}




		///////////////////////////////
		// QCUBED QUERY-RELATED METHODS
		///////////////////////////////

		/**
		 * Internally called method to assist with calling Qcubed Query for this class
		 * on load methods.
		 * @param QQueryBuilder &$objQueryBuilder the QueryBuilder object that will be created
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause object or array of QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with (sending in null will skip the PrepareStatement step)
		 * @param boolean $blnCountOnly only select a rowcount
		 * @return string the query statement
		 */
		protected static function BuildQueryStatement(&$objQueryBuilder, QQCondition $objConditions, $objOptionalClauses, $mixParameterArray, $blnCountOnly) {
			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();

			// Create/Build out the QueryBuilder object with TableUserProjectTmp-specific SELET and FROM fields
			$objQueryBuilder = new QQueryBuilder($objDatabase, 'table_user_project_tmp');
			TableUserProjectTmp::GetSelectFields($objQueryBuilder);
			$objQueryBuilder->AddFromItem('table_user_project_tmp');

			// Set "CountOnly" option (if applicable)
			if ($blnCountOnly)
				$objQueryBuilder->SetCountOnlyFlag();

			// Apply Any Conditions
			if ($objConditions)
				try {
					$objConditions->UpdateQueryBuilder($objQueryBuilder);
				} catch (QCallerException $objExc) {
					$objExc->IncrementOffset();
					throw $objExc;
				}

			// Iterate through all the Optional Clauses (if any) and perform accordingly
			if ($objOptionalClauses) {
				if ($objOptionalClauses instanceof QQClause)
					$objOptionalClauses->UpdateQueryBuilder($objQueryBuilder);
				else if (is_array($objOptionalClauses))
					foreach ($objOptionalClauses as $objClause)
						$objClause->UpdateQueryBuilder($objQueryBuilder);
				else
					throw new QCallerException('Optional Clauses must be a QQClause object or an array of QQClause objects');
			}

			// Get the SQL Statement
			$strQuery = $objQueryBuilder->GetStatement();

			// Prepare the Statement with the Query Parameters (if applicable)
			if ($mixParameterArray) {
				if (is_array($mixParameterArray)) {
					if (count($mixParameterArray))
						$strQuery = $objDatabase->PrepareStatement($strQuery, $mixParameterArray);

					// Ensure that there are no other Unresolved Named Parameters
					if (strpos($strQuery, chr(QQNamedValue::DelimiterCode) . '{') !== false)
						throw new QCallerException('Unresolved named parameters in the query');
				} else
					throw new QCallerException('Parameter Array must be an array of name-value parameter pairs');
			}

			// Return the Objects
			return $strQuery;
		}

		/**
		 * Static Qcubed Query method to query for a single TableUserProjectTmp object.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return TableUserProjectTmp the queried object
		 */
		public static function QuerySingle(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableUserProjectTmp::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
			
			// Perform the Query, Get the First Row, and Instantiate a new TableUserProjectTmp object
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);
			
			// Do we have to expand anything?
			if ($objQueryBuilder->ExpandAsArrayNodes) {
				$objToReturn = array();
				while ($objDbRow = $objDbResult->GetNextRow()) {
					$objItem = TableUserProjectTmp::InstantiateDbRow($objDbRow, null, $objQueryBuilder->ExpandAsArrayNodes, $objToReturn, $objQueryBuilder->ColumnAliasArray);
					if ($objItem)
						$objToReturn[] = $objItem;					
				}			
				// Since we only want the object to return, lets return the object and not the array.
				return $objToReturn[0];
			} else {
				// No expands just return the first row
				$objToReturn = null;
				while ($objDbRow = $objDbResult->GetNextRow())
					$objToReturn = TableUserProjectTmp::InstantiateDbRow($objDbRow, null, null, null, $objQueryBuilder->ColumnAliasArray);
			}
			
			return $objToReturn;
		}

		/**
		 * Static Qcubed Query method to query for an array of TableUserProjectTmp objects.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return TableUserProjectTmp[] the queried objects as an array
		 */
		public static function QueryArray(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableUserProjectTmp::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Perform the Query and Instantiate the Array Result
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);
			return TableUserProjectTmp::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes, $objQueryBuilder->ColumnAliasArray);
		}

		/**
		 * Static Qcubed Query method to query for a count of TableUserProjectTmp objects.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return integer the count of queried objects as an integer
		 */
		public static function QueryCount(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableUserProjectTmp::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, true);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Perform the Query and return the row_count
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);

			// Figure out if the query is using GroupBy
			$blnGrouped = false;

			if ($objOptionalClauses) foreach ($objOptionalClauses as $objClause) {
				if ($objClause instanceof QQGroupBy) {
					$blnGrouped = true;
					break;
				}
			}

			if ($blnGrouped)
				// Groups in this query - return the count of Groups (which is the count of all rows)
				return $objDbResult->CountRows();
			else {
				// No Groups - return the sql-calculated count(*) value
				$strDbRow = $objDbResult->FetchRow();
				return QType::Cast($strDbRow[0], QType::Integer);
			}
		}

		public static function QueryArrayCached(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null, $blnForceUpdate = false) {
			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();

			$strQuery = TableUserProjectTmp::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			
			$objCache = new QCache('qquery/tableuserprojecttmp', $strQuery);
			$cacheData = $objCache->GetData();
			
			if (!$cacheData || $blnForceUpdate) {
				$objDbResult = $objQueryBuilder->Database->Query($strQuery);
				$arrResult = TableUserProjectTmp::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes, $objQueryBuilder->ColumnAliasArray);
				$objCache->SaveData(serialize($arrResult));
			} else {
				$arrResult = unserialize($cacheData);
			}
			
			return $arrResult;
		}

		/**
		 * Updates a QQueryBuilder with the SELECT fields for this TableUserProjectTmp
		 * @param QQueryBuilder $objBuilder the Query Builder object to update
		 * @param string $strPrefix optional prefix to add to the SELECT fields
		 */
		public static function GetSelectFields(QQueryBuilder $objBuilder, $strPrefix = null) {
			if ($strPrefix) {
				$strTableName = $strPrefix;
				$strAliasPrefix = $strPrefix . '__';
			} else {
				$strTableName = 'table_user_project_tmp';
				$strAliasPrefix = '';
			}

			$objBuilder->AddSelectItem($strTableName, 'id', $strAliasPrefix . 'id');
			$objBuilder->AddSelectItem($strTableName, 'user_name', $strAliasPrefix . 'user_name');
			$objBuilder->AddSelectItem($strTableName, 'firstname', $strAliasPrefix . 'firstname');
			$objBuilder->AddSelectItem($strTableName, 'lastname', $strAliasPrefix . 'lastname');
			$objBuilder->AddSelectItem($strTableName, 'mail', $strAliasPrefix . 'mail');
			$objBuilder->AddSelectItem($strTableName, 'password', $strAliasPrefix . 'password');
			$objBuilder->AddSelectItem($strTableName, 'ip', $strAliasPrefix . 'ip');
			$objBuilder->AddSelectItem($strTableName, 'input_date', $strAliasPrefix . 'input_date');
			$objBuilder->AddSelectItem($strTableName, 'timeup_date', $strAliasPrefix . 'timeup_date');
			$objBuilder->AddSelectItem($strTableName, 'url', $strAliasPrefix . 'url');
			$objBuilder->AddSelectItem($strTableName, 'registered', $strAliasPrefix . 'registered');
			$objBuilder->AddSelectItem($strTableName, 'register_date', $strAliasPrefix . 'register_date');
		}



		///////////////////////////////
		// INSTANTIATION-RELATED METHODS
		///////////////////////////////

		/**
		 * Instantiate a TableUserProjectTmp from a Database Row.
		 * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
		 * is calling this TableUserProjectTmp::InstantiateDbRow in order to perform
		 * early binding on referenced objects.
		 * @param DatabaseRowBase $objDbRow
		 * @param string $strAliasPrefix
		 * @param string $strExpandAsArrayNodes
		 * @param QBaseClass $arrPreviousItem
		 * @param string[] $strColumnAliasArray
		 * @return TableUserProjectTmp
		*/
		public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $arrPreviousItems = null, $strColumnAliasArray = array()) {
			// If blank row, return null
			if (!$objDbRow) {
				return null;
			}

			// Create a new instance of the TableUserProjectTmp object
			$objToReturn = new TableUserProjectTmp();
			$objToReturn->__blnRestored = true;

			$strAliasName = array_key_exists($strAliasPrefix . 'id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'id'] : $strAliasPrefix . 'id';
			$objToReturn->intId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'user_name', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'user_name'] : $strAliasPrefix . 'user_name';
			$objToReturn->strUserName = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'firstname', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'firstname'] : $strAliasPrefix . 'firstname';
			$objToReturn->strFirstname = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'lastname', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'lastname'] : $strAliasPrefix . 'lastname';
			$objToReturn->strLastname = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'mail', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'mail'] : $strAliasPrefix . 'mail';
			$objToReturn->strMail = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'password', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'password'] : $strAliasPrefix . 'password';
			$objToReturn->strPassword = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'ip', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'ip'] : $strAliasPrefix . 'ip';
			$objToReturn->strIp = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'input_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'input_date'] : $strAliasPrefix . 'input_date';
			$objToReturn->dttInputDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
			$strAliasName = array_key_exists($strAliasPrefix . 'timeup_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'timeup_date'] : $strAliasPrefix . 'timeup_date';
			$objToReturn->dttTimeupDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
			$strAliasName = array_key_exists($strAliasPrefix . 'url', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'url'] : $strAliasPrefix . 'url';
			$objToReturn->strUrl = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'registered', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'registered'] : $strAliasPrefix . 'registered';
			$objToReturn->strRegistered = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'register_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'register_date'] : $strAliasPrefix . 'register_date';
			$objToReturn->dttRegisterDate = $objDbRow->GetColumn($strAliasName, 'DateTime');

			if (isset($arrPreviousItems) && is_array($arrPreviousItems)) {
				foreach ($arrPreviousItems as $objPreviousItem) {
					if ($objToReturn->Id != $objPreviousItem->Id) {
						continue;
					}

					// complete match - all primary key columns are the same
					return null;
				}
			}

			// Instantiate Virtual Attributes
			foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
				$strVirtualPrefix = $strAliasPrefix . '__';
				$strVirtualPrefixLength = strlen($strVirtualPrefix);
				if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix)
					$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
			}

			// Prepare to Check for Early/Virtual Binding
			if (!$strAliasPrefix)
				$strAliasPrefix = 'table_user_project_tmp__';




			return $objToReturn;
		}

		/**
		 * Instantiate an array of TableUserProjectTmps from a Database Result
		 * @param DatabaseResultBase $objDbResult
		 * @param string $strExpandAsArrayNodes
		 * @param string[] $strColumnAliasArray
		 * @return TableUserProjectTmp[]
		 */
		public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null, $strColumnAliasArray = null) {
			$objToReturn = array();
			
			if (!$strColumnAliasArray)
				$strColumnAliasArray = array();

			// If blank resultset, then return empty array
			if (!$objDbResult)
				return $objToReturn;

			// Load up the return array with each row
			if ($strExpandAsArrayNodes) {
				$objToReturn = array();
				while ($objDbRow = $objDbResult->GetNextRow()) {
					$objItem = TableUserProjectTmp::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objToReturn, $strColumnAliasArray);
					if ($objItem) {
						$objToReturn[] = $objItem;
					}
				}
			} else {
				while ($objDbRow = $objDbResult->GetNextRow())
					$objToReturn[] = TableUserProjectTmp::InstantiateDbRow($objDbRow, null, null, null, $strColumnAliasArray);
			}

			return $objToReturn;
		}



		///////////////////////////////////////////////////
		// INDEX-BASED LOAD METHODS (Single Load and Array)
		///////////////////////////////////////////////////
			
		/**
		 * Load a single TableUserProjectTmp object,
		 * by Id Index(es)
		 * @param integer $intId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp
		*/
		public static function LoadById($intId, $objOptionalClauses = null) {
			return TableUserProjectTmp::QuerySingle(
				QQ::AndCondition(
					QQ::Equal(QQN::TableUserProjectTmp()->Id, $intId)
				),
				$objOptionalClauses
			);
		}
			
		/**
		 * Load a single TableUserProjectTmp object,
		 * by UserName Index(es)
		 * @param string $strUserName
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp
		*/
		public static function LoadByUserName($strUserName, $objOptionalClauses = null) {
			return TableUserProjectTmp::QuerySingle(
				QQ::AndCondition(
					QQ::Equal(QQN::TableUserProjectTmp()->UserName, $strUserName)
				),
				$objOptionalClauses
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by Mail Index(es)
		 * @param string $strMail
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByMail($strMail, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByMail query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->Mail, $strMail),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by Mail Index(es)
		 * @param string $strMail
		 * @return int
		*/
		public static function CountByMail($strMail) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByMail query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->Mail, $strMail)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by Password Index(es)
		 * @param string $strPassword
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByPassword($strPassword, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByPassword query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->Password, $strPassword),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by Password Index(es)
		 * @param string $strPassword
		 * @return int
		*/
		public static function CountByPassword($strPassword) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByPassword query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->Password, $strPassword)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by Ip Index(es)
		 * @param string $strIp
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByIp($strIp, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByIp query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->Ip, $strIp),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by Ip Index(es)
		 * @param string $strIp
		 * @return int
		*/
		public static function CountByIp($strIp) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByIp query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->Ip, $strIp)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by InputDate Index(es)
		 * @param QDateTime $dttInputDate
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByInputDate($dttInputDate, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByInputDate query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->InputDate, $dttInputDate),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by InputDate Index(es)
		 * @param QDateTime $dttInputDate
		 * @return int
		*/
		public static function CountByInputDate($dttInputDate) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByInputDate query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->InputDate, $dttInputDate)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by Registered Index(es)
		 * @param string $strRegistered
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByRegistered($strRegistered, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByRegistered query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->Registered, $strRegistered),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by Registered Index(es)
		 * @param string $strRegistered
		 * @return int
		*/
		public static function CountByRegistered($strRegistered) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByRegistered query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->Registered, $strRegistered)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by Url Index(es)
		 * @param string $strUrl
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByUrl($strUrl, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByUrl query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->Url, $strUrl),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by Url Index(es)
		 * @param string $strUrl
		 * @return int
		*/
		public static function CountByUrl($strUrl) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByUrl query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->Url, $strUrl)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by RegisterDate Index(es)
		 * @param QDateTime $dttRegisterDate
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByRegisterDate($dttRegisterDate, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByRegisterDate query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::Equal(QQN::TableUserProjectTmp()->RegisterDate, $dttRegisterDate),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by RegisterDate Index(es)
		 * @param QDateTime $dttRegisterDate
		 * @return int
		*/
		public static function CountByRegisterDate($dttRegisterDate) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByRegisterDate query
			return TableUserProjectTmp::QueryCount(
				QQ::Equal(QQN::TableUserProjectTmp()->RegisterDate, $dttRegisterDate)
			);
		}
			
		/**
		 * Load an array of TableUserProjectTmp objects,
		 * by RegisterDate, Registered, Url Index(es)
		 * @param QDateTime $dttRegisterDate
		 * @param string $strRegistered
		 * @param string $strUrl
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableUserProjectTmp[]
		*/
		public static function LoadArrayByRegisterDateRegisteredUrl($dttRegisterDate, $strRegistered, $strUrl, $objOptionalClauses = null) {
			// Call TableUserProjectTmp::QueryArray to perform the LoadArrayByRegisterDateRegisteredUrl query
			try {
				return TableUserProjectTmp::QueryArray(
					QQ::AndCondition(
					QQ::Equal(QQN::TableUserProjectTmp()->RegisterDate, $dttRegisterDate),
					QQ::Equal(QQN::TableUserProjectTmp()->Registered, $strRegistered),
					QQ::Equal(QQN::TableUserProjectTmp()->Url, $strUrl)
					),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableUserProjectTmps
		 * by RegisterDate, Registered, Url Index(es)
		 * @param QDateTime $dttRegisterDate
		 * @param string $strRegistered
		 * @param string $strUrl
		 * @return int
		*/
		public static function CountByRegisterDateRegisteredUrl($dttRegisterDate, $strRegistered, $strUrl) {
			// Call TableUserProjectTmp::QueryCount to perform the CountByRegisterDateRegisteredUrl query
			return TableUserProjectTmp::QueryCount(
				QQ::AndCondition(
				QQ::Equal(QQN::TableUserProjectTmp()->RegisterDate, $dttRegisterDate),
				QQ::Equal(QQN::TableUserProjectTmp()->Registered, $strRegistered),
				QQ::Equal(QQN::TableUserProjectTmp()->Url, $strUrl)
				)
			);
		}



		////////////////////////////////////////////////////
		// INDEX-BASED LOAD METHODS (Array via Many to Many)
		////////////////////////////////////////////////////




		//////////////////////////
		// SAVE, DELETE AND RELOAD
		//////////////////////////

		/**
		 * Save this TableUserProjectTmp
		 * @param bool $blnForceInsert
		 * @param bool $blnForceUpdate
		 * @return int
		 */
		public function Save($blnForceInsert = false, $blnForceUpdate = false) {
			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();

			$mixToReturn = null;

			try {
				if ((!$this->__blnRestored) || ($blnForceInsert)) {
					// Perform an INSERT query
					$objDatabase->NonQuery('
						INSERT INTO `table_user_project_tmp` (
							`user_name`,
							`firstname`,
							`lastname`,
							`mail`,
							`password`,
							`ip`,
							`input_date`,
							`timeup_date`,
							`url`,
							`registered`,
							`register_date`
						) VALUES (
							' . $objDatabase->SqlVariable($this->strUserName) . ',
							' . $objDatabase->SqlVariable($this->strFirstname) . ',
							' . $objDatabase->SqlVariable($this->strLastname) . ',
							' . $objDatabase->SqlVariable($this->strMail) . ',
							' . $objDatabase->SqlVariable($this->strPassword) . ',
							' . $objDatabase->SqlVariable($this->strIp) . ',
							' . $objDatabase->SqlVariable($this->dttInputDate) . ',
							' . $objDatabase->SqlVariable($this->dttTimeupDate) . ',
							' . $objDatabase->SqlVariable($this->strUrl) . ',
							' . $objDatabase->SqlVariable($this->strRegistered) . ',
							' . $objDatabase->SqlVariable($this->dttRegisterDate) . '
						)
					');

					// Update Identity column and return its value
					$mixToReturn = $this->intId = $objDatabase->InsertId('table_user_project_tmp', 'id');
				} else {
					// Perform an UPDATE query

					// First checking for Optimistic Locking constraints (if applicable)

					// Perform the UPDATE query
					$objDatabase->NonQuery('
						UPDATE
							`table_user_project_tmp`
						SET
							`user_name` = ' . $objDatabase->SqlVariable($this->strUserName) . ',
							`firstname` = ' . $objDatabase->SqlVariable($this->strFirstname) . ',
							`lastname` = ' . $objDatabase->SqlVariable($this->strLastname) . ',
							`mail` = ' . $objDatabase->SqlVariable($this->strMail) . ',
							`password` = ' . $objDatabase->SqlVariable($this->strPassword) . ',
							`ip` = ' . $objDatabase->SqlVariable($this->strIp) . ',
							`input_date` = ' . $objDatabase->SqlVariable($this->dttInputDate) . ',
							`timeup_date` = ' . $objDatabase->SqlVariable($this->dttTimeupDate) . ',
							`url` = ' . $objDatabase->SqlVariable($this->strUrl) . ',
							`registered` = ' . $objDatabase->SqlVariable($this->strRegistered) . ',
							`register_date` = ' . $objDatabase->SqlVariable($this->dttRegisterDate) . '
						WHERE
							`id` = ' . $objDatabase->SqlVariable($this->intId) . '
					');
				}

			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Update __blnRestored and any Non-Identity PK Columns (if applicable)
			$this->__blnRestored = true;


			// Return 
			return $mixToReturn;
		}

		/**
		 * Delete this TableUserProjectTmp
		 * @return void
		 */
		public function Delete() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Cannot delete this TableUserProjectTmp with an unset primary key.');

			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();


			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_user_project_tmp`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($this->intId) . '');
		}

		/**
		 * Delete all TableUserProjectTmps
		 * @return void
		 */
		public static function DeleteAll() {
			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();

			// Perform the Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_user_project_tmp`');
		}

		/**
		 * Truncate table_user_project_tmp table
		 * @return void
		 */
		public static function Truncate() {
			// Get the Database Object for this Class
			$objDatabase = TableUserProjectTmp::GetDatabase();

			// Perform the Query
			$objDatabase->NonQuery('
				TRUNCATE `table_user_project_tmp`');
		}

		/**
		 * Reload this TableUserProjectTmp from the database.
		 * @return void
		 */
		public function Reload() {
			// Make sure we are actually Restored from the database
			if (!$this->__blnRestored)
				throw new QCallerException('Cannot call Reload() on a new, unsaved TableUserProjectTmp object.');

			// Reload the Object
			$objReloaded = TableUserProjectTmp::Load($this->intId);

			// Update $this's local variables to match
			$this->strUserName = $objReloaded->strUserName;
			$this->strFirstname = $objReloaded->strFirstname;
			$this->strLastname = $objReloaded->strLastname;
			$this->strMail = $objReloaded->strMail;
			$this->strPassword = $objReloaded->strPassword;
			$this->strIp = $objReloaded->strIp;
			$this->dttInputDate = $objReloaded->dttInputDate;
			$this->dttTimeupDate = $objReloaded->dttTimeupDate;
			$this->strUrl = $objReloaded->strUrl;
			$this->strRegistered = $objReloaded->strRegistered;
			$this->dttRegisterDate = $objReloaded->dttRegisterDate;
		}



		////////////////////
		// PUBLIC OVERRIDERS
		////////////////////

				/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				///////////////////
				// Member Variables
				///////////////////
				case 'Id':
					/**
					 * Gets the value for intId (Read-Only PK)
					 * @return integer
					 */
					return $this->intId;

				case 'UserName':
					/**
					 * Gets the value for strUserName (Unique)
					 * @return string
					 */
					return $this->strUserName;

				case 'Firstname':
					/**
					 * Gets the value for strFirstname 
					 * @return string
					 */
					return $this->strFirstname;

				case 'Lastname':
					/**
					 * Gets the value for strLastname 
					 * @return string
					 */
					return $this->strLastname;

				case 'Mail':
					/**
					 * Gets the value for strMail (Not Null)
					 * @return string
					 */
					return $this->strMail;

				case 'Password':
					/**
					 * Gets the value for strPassword 
					 * @return string
					 */
					return $this->strPassword;

				case 'Ip':
					/**
					 * Gets the value for strIp 
					 * @return string
					 */
					return $this->strIp;

				case 'InputDate':
					/**
					 * Gets the value for dttInputDate 
					 * @return QDateTime
					 */
					return $this->dttInputDate;

				case 'TimeupDate':
					/**
					 * Gets the value for dttTimeupDate 
					 * @return QDateTime
					 */
					return $this->dttTimeupDate;

				case 'Url':
					/**
					 * Gets the value for strUrl (Not Null)
					 * @return string
					 */
					return $this->strUrl;

				case 'Registered':
					/**
					 * Gets the value for strRegistered (Not Null)
					 * @return string
					 */
					return $this->strRegistered;

				case 'RegisterDate':
					/**
					 * Gets the value for dttRegisterDate 
					 * @return QDateTime
					 */
					return $this->dttRegisterDate;


				///////////////////
				// Member Objects
				///////////////////

				////////////////////////////
				// Virtual Object References (Many to Many and Reverse References)
				// (If restored via a "Many-to" expansion)
				////////////////////////////


				case '__Restored':
					return $this->__blnRestored;

				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

				/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			switch ($strName) {
				///////////////////
				// Member Variables
				///////////////////
				case 'UserName':
					/**
					 * Sets the value for strUserName (Unique)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strUserName = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Firstname':
					/**
					 * Sets the value for strFirstname 
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strFirstname = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Lastname':
					/**
					 * Sets the value for strLastname 
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strLastname = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Mail':
					/**
					 * Sets the value for strMail (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strMail = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Password':
					/**
					 * Sets the value for strPassword 
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strPassword = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Ip':
					/**
					 * Sets the value for strIp 
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strIp = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'InputDate':
					/**
					 * Sets the value for dttInputDate 
					 * @param QDateTime $mixValue
					 * @return QDateTime
					 */
					try {
						return ($this->dttInputDate = QType::Cast($mixValue, QType::DateTime));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'TimeupDate':
					/**
					 * Sets the value for dttTimeupDate 
					 * @param QDateTime $mixValue
					 * @return QDateTime
					 */
					try {
						return ($this->dttTimeupDate = QType::Cast($mixValue, QType::DateTime));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Url':
					/**
					 * Sets the value for strUrl (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strUrl = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Registered':
					/**
					 * Sets the value for strRegistered (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strRegistered = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'RegisterDate':
					/**
					 * Sets the value for dttRegisterDate 
					 * @param QDateTime $mixValue
					 * @return QDateTime
					 */
					try {
						return ($this->dttRegisterDate = QType::Cast($mixValue, QType::DateTime));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}


				///////////////////
				// Member Objects
				///////////////////
				default:
					try {
						return parent::__set($strName, $mixValue);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Lookup a VirtualAttribute value (if applicable).  Returns NULL if none found.
		 * @param string $strName
		 * @return string
		 */
		public function GetVirtualAttribute($strName) {
			if (array_key_exists($strName, $this->__strVirtualAttributeArray))
				return $this->__strVirtualAttributeArray[$strName];
			return null;
		}



		///////////////////////////////
		// ASSOCIATED OBJECTS' METHODS
		///////////////////////////////





		////////////////////////////////////////
		// METHODS for SOAP-BASED WEB SERVICES
		////////////////////////////////////////

		public static function GetSoapComplexTypeXml() {
			$strToReturn = '<complexType name="TableUserProjectTmp"><sequence>';
			$strToReturn .= '<element name="Id" type="xsd:int"/>';
			$strToReturn .= '<element name="UserName" type="xsd:string"/>';
			$strToReturn .= '<element name="Firstname" type="xsd:string"/>';
			$strToReturn .= '<element name="Lastname" type="xsd:string"/>';
			$strToReturn .= '<element name="Mail" type="xsd:string"/>';
			$strToReturn .= '<element name="Password" type="xsd:string"/>';
			$strToReturn .= '<element name="Ip" type="xsd:string"/>';
			$strToReturn .= '<element name="InputDate" type="xsd:dateTime"/>';
			$strToReturn .= '<element name="TimeupDate" type="xsd:dateTime"/>';
			$strToReturn .= '<element name="Url" type="xsd:string"/>';
			$strToReturn .= '<element name="Registered" type="xsd:string"/>';
			$strToReturn .= '<element name="RegisterDate" type="xsd:dateTime"/>';
			$strToReturn .= '<element name="__blnRestored" type="xsd:boolean"/>';
			$strToReturn .= '</sequence></complexType>';
			return $strToReturn;
		}

		public static function AlterSoapComplexTypeArray(&$strComplexTypeArray) {
			if (!array_key_exists('TableUserProjectTmp', $strComplexTypeArray)) {
				$strComplexTypeArray['TableUserProjectTmp'] = TableUserProjectTmp::GetSoapComplexTypeXml();
			}
		}

		public static function GetArrayFromSoapArray($objSoapArray) {
			$objArrayToReturn = array();

			foreach ($objSoapArray as $objSoapObject)
				array_push($objArrayToReturn, TableUserProjectTmp::GetObjectFromSoapObject($objSoapObject));

			return $objArrayToReturn;
		}

		public static function GetObjectFromSoapObject($objSoapObject) {
			$objToReturn = new TableUserProjectTmp();
			if (property_exists($objSoapObject, 'Id'))
				$objToReturn->intId = $objSoapObject->Id;
			if (property_exists($objSoapObject, 'UserName'))
				$objToReturn->strUserName = $objSoapObject->UserName;
			if (property_exists($objSoapObject, 'Firstname'))
				$objToReturn->strFirstname = $objSoapObject->Firstname;
			if (property_exists($objSoapObject, 'Lastname'))
				$objToReturn->strLastname = $objSoapObject->Lastname;
			if (property_exists($objSoapObject, 'Mail'))
				$objToReturn->strMail = $objSoapObject->Mail;
			if (property_exists($objSoapObject, 'Password'))
				$objToReturn->strPassword = $objSoapObject->Password;
			if (property_exists($objSoapObject, 'Ip'))
				$objToReturn->strIp = $objSoapObject->Ip;
			if (property_exists($objSoapObject, 'InputDate'))
				$objToReturn->dttInputDate = new QDateTime($objSoapObject->InputDate);
			if (property_exists($objSoapObject, 'TimeupDate'))
				$objToReturn->dttTimeupDate = new QDateTime($objSoapObject->TimeupDate);
			if (property_exists($objSoapObject, 'Url'))
				$objToReturn->strUrl = $objSoapObject->Url;
			if (property_exists($objSoapObject, 'Registered'))
				$objToReturn->strRegistered = $objSoapObject->Registered;
			if (property_exists($objSoapObject, 'RegisterDate'))
				$objToReturn->dttRegisterDate = new QDateTime($objSoapObject->RegisterDate);
			if (property_exists($objSoapObject, '__blnRestored'))
				$objToReturn->__blnRestored = $objSoapObject->__blnRestored;
			return $objToReturn;
		}

		public static function GetSoapArrayFromArray($objArray) {
			if (!$objArray)
				return null;

			$objArrayToReturn = array();

			foreach ($objArray as $objObject)
				array_push($objArrayToReturn, TableUserProjectTmp::GetSoapObjectFromObject($objObject, true));

			return unserialize(serialize($objArrayToReturn));
		}

		public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) {
			if ($objObject->dttInputDate)
				$objObject->dttInputDate = $objObject->dttInputDate->__toString(QDateTime::FormatSoap);
			if ($objObject->dttTimeupDate)
				$objObject->dttTimeupDate = $objObject->dttTimeupDate->__toString(QDateTime::FormatSoap);
			if ($objObject->dttRegisterDate)
				$objObject->dttRegisterDate = $objObject->dttRegisterDate->__toString(QDateTime::FormatSoap);
			return $objObject;
		}




	}



	/////////////////////////////////////
	// ADDITIONAL CLASSES for QCubed QUERY
	/////////////////////////////////////

	class QQNodeTableUserProjectTmp extends QQNode {
		protected $strTableName = 'table_user_project_tmp';
		protected $strPrimaryKey = 'id';
		protected $strClassName = 'TableUserProjectTmp';
		public function __get($strName) {
			switch ($strName) {
				case 'Id':
					return new QQNode('id', 'Id', 'integer', $this);
				case 'UserName':
					return new QQNode('user_name', 'UserName', 'string', $this);
				case 'Firstname':
					return new QQNode('firstname', 'Firstname', 'string', $this);
				case 'Lastname':
					return new QQNode('lastname', 'Lastname', 'string', $this);
				case 'Mail':
					return new QQNode('mail', 'Mail', 'string', $this);
				case 'Password':
					return new QQNode('password', 'Password', 'string', $this);
				case 'Ip':
					return new QQNode('ip', 'Ip', 'string', $this);
				case 'InputDate':
					return new QQNode('input_date', 'InputDate', 'QDateTime', $this);
				case 'TimeupDate':
					return new QQNode('timeup_date', 'TimeupDate', 'QDateTime', $this);
				case 'Url':
					return new QQNode('url', 'Url', 'string', $this);
				case 'Registered':
					return new QQNode('registered', 'Registered', 'string', $this);
				case 'RegisterDate':
					return new QQNode('register_date', 'RegisterDate', 'QDateTime', $this);

				case '_PrimaryKeyNode':
					return new QQNode('id', 'Id', 'integer', $this);
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
	}

	class QQReverseReferenceNodeTableUserProjectTmp extends QQReverseReferenceNode {
		protected $strTableName = 'table_user_project_tmp';
		protected $strPrimaryKey = 'id';
		protected $strClassName = 'TableUserProjectTmp';
		public function __get($strName) {
			switch ($strName) {
				case 'Id':
					return new QQNode('id', 'Id', 'integer', $this);
				case 'UserName':
					return new QQNode('user_name', 'UserName', 'string', $this);
				case 'Firstname':
					return new QQNode('firstname', 'Firstname', 'string', $this);
				case 'Lastname':
					return new QQNode('lastname', 'Lastname', 'string', $this);
				case 'Mail':
					return new QQNode('mail', 'Mail', 'string', $this);
				case 'Password':
					return new QQNode('password', 'Password', 'string', $this);
				case 'Ip':
					return new QQNode('ip', 'Ip', 'string', $this);
				case 'InputDate':
					return new QQNode('input_date', 'InputDate', 'QDateTime', $this);
				case 'TimeupDate':
					return new QQNode('timeup_date', 'TimeupDate', 'QDateTime', $this);
				case 'Url':
					return new QQNode('url', 'Url', 'string', $this);
				case 'Registered':
					return new QQNode('registered', 'Registered', 'string', $this);
				case 'RegisterDate':
					return new QQNode('register_date', 'RegisterDate', 'QDateTime', $this);

				case '_PrimaryKeyNode':
					return new QQNode('id', 'Id', 'integer', $this);
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
	}

?>